<?php


class SecondScreen extends CActiveRecord
{
	
	public static function model($Vgmajjibziuy=__CLASS__)
	{
		return parent::model($Vgmajjibziuy);
	}

	
	public function tableName()
	{
		return 'second_screen';
	}

	
	public function rules()
	{
		
		
		return array(
			array('web_url', 'required'),
			array('live_channel_id, status, period', 'numerical', 'integerOnly'=>true),
			array('live_channel_name', 'length', 'max'=>11),
			array('web_url', 'length', 'max'=>300),
			array('start_time, end_time', 'safe'),
			
			
			array('id, live_channel_id, live_channel_name, start_time, end_time, web_url, status, period', 'safe', 'on'=>'search'),
		);
	}

	
	public function relations()
	{
		
		
		return array(
		);
	}

	
	public function attributeLabels()
	{
		return array(
			'id' => 'ID',
			'live_channel_id' => 'Live Channel',
			'live_channel_name' => 'Live Channel Name',
			'start_time' => 'Start Time',
			'end_time' => 'End Time',
			'web_url' => 'Web Url',
			'status' => 'Status',
			'period' => 'Period',
		);
	}

	
	public function search()
	{
		
		

		$V0v5vsnfxezw=new CDbCriteria;

		$V0v5vsnfxezw->compare('id',$this->id);
		$V0v5vsnfxezw->compare('live_channel_id',$this->live_channel_id);
		$V0v5vsnfxezw->compare('live_channel_name',$this->live_channel_name,true);
		$V0v5vsnfxezw->compare('start_time',$this->start_time,true);
		$V0v5vsnfxezw->compare('end_time',$this->end_time,true);
		$V0v5vsnfxezw->compare('web_url',$this->web_url,true);
		$V0v5vsnfxezw->compare('status',$this->status);
		$V0v5vsnfxezw->compare('period',$this->period);

		return new CActiveDataProvider($this, array(
			'criteria'=>$V0v5vsnfxezw,
		));
	}
}